home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000309_fdc@columbia.edu_Fri Sep 26 12:21:09 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  45 lines

  1. Article: 14553 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news-not-for-mail
  3. From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: How to use fopen
  6. Date: 26 Sep 2003 12:21:05 -0400
  7. Organization: Columbia University
  8. Lines: 27
  9. Message-ID: <bl1p1h$e5p$1@sesame.cc.columbia.edu>
  10. References: <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com> <bl1hjq$s8o$1@sesame.cc.columbia.edu> <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>
  11. Reply-To: fdc@columbia.edu
  12. NNTP-Posting-Host: sesame.cc.columbia.edu
  13. X-Trace: newsmaster.cc.columbia.edu 1064593265 7691 128.59.59.56 (26 Sep 2003 16:21:05 GMT)
  14. X-Complaints-To: postmaster@columbia.edu
  15. NNTP-Posting-Date: 26 Sep 2003 16:21:05 GMT
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14553
  17.  
  18. In article <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>,
  19. Jun Zhang  <nugulus@netscape.net> wrote:
  20. : fopen /read \%c inputfile
  21. : fread \%c a
  22. : so that each element of the array will be a field of a line in 
  23. : inputfile. Suppose a line in the inputfile is like,
  24. :     5122785633  root  rootpass
  25. : I'll have a[2] with the value 'rootpass'.
  26. : Please correct me.
  27. This is not something that FREAD does.  Instead you would read a line,
  28. and then assign its fields to an array with \fsplit():
  29.  
  30.   http://www.columbia.edu/kermit/ckermit70.html#x7.3
  31.   http://www.columbia.edu/kermit/ckermit80.html#x8.7.2
  32.  
  33. Read both of these references; significant improvements were made to
  34. \fsplit() in C-Kermit 8.0.
  35.  
  36. Example:
  37.  
  38.   fread /line \%c record
  39.   if fail ...
  40.   void \fsplit(\m(record),&a)
  41.  
  42. - Frank
  43.